package dabs.engine.messaging;

import java.io.Serializable;

public class PostOffice implements NotificationHandler, Serializable
{
	private static final long serialVersionUID = 5839649319700365994L;
	
	// transient because we don't keep the interface in the save files.
	private transient NotificationHandler passon; // can be extended into a list
	public void registerHandler(NotificationHandler notHandler) {
		passon = notHandler;
	}
	
	synchronized public void handleNotification(Notification notif) {
		passon.handleNotification(notif);
	}
}
